﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.Web;

namespace ServiceLayer
{
    [DataContract]
    public class UserDTO
    {
        [DataMember]
        public int Id { set; get; }

        [DataMember]
        public string Username { set; get; }

        [DataMember]
        public string Password { set; get; }

        [DataMember]
        public PrivilegeLevelDTO PrivilegeLevel { set; get; }

        internal UserDTO(BusinessLayer.User user)
        {
            Id = user.Id;
            Username = user.Username;
            Password = user.Password;
            PrivilegeLevel = new PrivilegeLevelDTO(user.PrivilegeLevel);
        }
    }
}